// 项目接口定义
export interface Project {
  id: number;
  name: string;
  code: string;
  description?: string;
  status: '规划中' | '进行中' | '已暂停' | '已完成' | '已取消';
  priority: '低' | '中' | '高' | '紧急';
  progress: number; // 0-100
  startDate: string;
  endDate: string;
  manager: string;
  teamMembers: string[];
  budget?: number;
  actualCost?: number;
  createdAt: string;
  updatedAt?: string;
}

// 获取项目列表参数接口
export interface GetProjectsParams {
  page?: number;
  pageSize?: number;
  search?: string;
  status?: Project['status'];
  priority?: Project['priority'];
}

// 项目统计接口
export interface ProjectStats {
  total: number;
  planning: number;
  inProgress: number;
  paused: number;
  completed: number;
  cancelled: number;
  overdue: number;
  totalBudget: number;
  totalCost: number;
}

// 项目成员接口
export interface ProjectMember {
  id: number;
  projectId: number;
  userId: number;
  username: string;
  name: string;
  role: string;
  joinDate: string;
  leaveDate?: string;
}

// 项目里程碑接口
export interface ProjectMilestone {
  id: number;
  projectId: number;
  name: string;
  description?: string;
  dueDate: string;
  status: '未开始' | '进行中' | '已完成' | '已延期';
  completedDate?: string;
  createdAt: string;
}

// API响应接口
export interface ApiResponse<T> {
  data: T;
  total: number;
  success: boolean;
  message?: string;
}